<?php
require_once('../lib/standard.php');
set_pineza();
check_login();
$board = check_board();

if ((!perastike('notes')) || (!$_REQUEST['notes'])) telos('no notes passed');
else $notes = $_REQUEST['notes'];

$nl = explode('@', $notes);
$nn = count($nl) - 1;
for ($i = 0; $i < $nn; $i++)
	move_note($nl[$i], $board);

$pineza->close_database();
print AJAX_SEP;

function move_note($note, $board) {
	global $pineza;
	$query = "UPDATE `note` SET `board` = '" . escape($board) .
		"' WHERE `key` = " . escape($note) . " LIMIT 1";
	mysqli_query($pineza->db, $query);
}
?>
